<!DOCTYPE html>
<html lang="en" xmlns:c="http://java.sun.com/jsp/jstl/core">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/static/jquery-1.11.3.js"></script>

    <script>
        $(function (){
            var $employeeList = $('#employeeList')

            $.get('/employee/list',function (data){
                data.forEach(function (value){
                    $employeeList.append(
                        '<tr><td>' + value.id + '</td><td>' + value.name +'</td><td>' + value.age + '</td></tr>');

                })
            })
        });
    </script>
</head>
<body>

<a href="/employee/input">新增</a>

<table width="800px" cellpadding="0" cellspacing="0" align="center" border="1px">
    <tr>
        <td>ID</td>
        <td>姓名</td>
        <td>年龄</td>
    </tr>

    <c:forEach items="${pageResult.data}" var="employee">
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td>
                <a href="/employee/delete?id=${employee.id}">删除</a>
                <a href="/employee/input?id=${employee.id}">修改</a>
            </td>
        </tr>
    </c:forEach>
</table>
</body>
</html>